package com.ruoyi.enterprise.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.enterprise.mapper.SInterviewMapper;
import com.ruoyi.enterprise.domain.SInterview;
import com.ruoyi.enterprise.service.ISInterviewService;

/**
 * 求职信息Service业务层处理
 * 
 * @author jeffery
 * @date 2021-08-31
 */
@Service
public class SInterviewServiceImpl implements ISInterviewService 
{
    @Autowired
    private SInterviewMapper sInterviewMapper;

    /**
     * 查询求职信息
     * 
     * @param interviewId 求职信息主键
     * @return 求职信息
     */
    @Override
    public SInterview selectSInterviewByInterviewId(Long interviewId)
    {
        return sInterviewMapper.selectSInterviewByInterviewId(interviewId);
    }

    /**
     * 查询求职信息列表
     * 
     * @param sInterview 求职信息
     * @return 求职信息
     */
    @Override
    public List<SInterview> selectSInterviewList(SInterview sInterview)
    {
        return sInterviewMapper.selectSInterviewList(sInterview);
    }

    /**
     * 新增求职信息
     * 
     * @param sInterview 求职信息
     * @return 结果
     */
    @Override
    public int insertSInterview(SInterview sInterview)
    {
        sInterview.setCreateTime(DateUtils.getNowDate());
        return sInterviewMapper.insertSInterview(sInterview);
    }

    /**
     * 修改求职信息
     * 
     * @param sInterview 求职信息
     * @return 结果
     */
    @Override
    public int updateSInterview(SInterview sInterview)
    {
        sInterview.setUpdateTime(DateUtils.getNowDate());
        return sInterviewMapper.updateSInterview(sInterview);
    }

    /**
     * 批量删除求职信息
     * 
     * @param interviewIds 需要删除的求职信息主键
     * @return 结果
     */
    @Override
    public int deleteSInterviewByInterviewIds(Long[] interviewIds)
    {
        return sInterviewMapper.deleteSInterviewByInterviewIds(interviewIds);
    }

    /**
     * 删除求职信息信息
     * 
     * @param interviewId 求职信息主键
     * @return 结果
     */
    @Override
    public int deleteSInterviewByInterviewId(Long interviewId)
    {
        return sInterviewMapper.deleteSInterviewByInterviewId(interviewId);
    }
}
